home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / include / sys / audiovar.h < prev    next >
C/C++ Source or Header  |  1990-04-12  |  1KB  |  55 lines

  1. /*    "@(#)audiovar.h 1.17 89/04/20 SMI"
  2. */
  3.  
  4. #ifndef LOCORE
  5.  
  6. /*  This is the default size for the ring buffer.  Size must be a power of
  7.  *  2, so that we can make a bit mask for efficient operation.  Eventually,
  8.  *  the user will be able to specify the size of the buffer that he
  9.  *  desires.
  10.  */
  11. #define AUDIO_DEFAULT_RING_SIZE        16384
  12. #define AUDIO_DEFAULT_RING_MASK        0x003fff
  13.  
  14. #define AUDIO_MIN_RING_SIZE        1024
  15. #define AUDIO_MAX_RING_SIZE        1048576
  16.  
  17.  
  18. #if 0
  19. struct    audio_ring {
  20.     char    *data;
  21.     int    head;
  22.     int    tail;
  23.     int    wakeup;
  24.     int    size;
  25.     int    mask;
  26. };
  27.  
  28. struct    audio {
  29.     int    opened;
  30.     int    read_active;
  31.     int    write_active;
  32.     int    pause;
  33.     int    drain;
  34.     int    interrupt_reason;
  35.     struct    audio_chip    *chip;
  36.     struct    audio_ring    read_ring;
  37.     struct    audio_ring    write_ring;
  38.     struct    buf    read_buf;
  39.     struct    buf    write_buf;
  40. };
  41.  
  42. #endif
  43.  
  44. #endif
  45.  
  46. /*  These are the reasons we can schedule a level 4 interrupt.
  47.  */
  48.  
  49. #define AUDIO_INTERRUPT_NONE        0
  50. #define AUDIO_INTERRUPT_WAKEUP_READ    0x01
  51. #define AUDIO_INTERRUPT_WAKEUP_WRITE    0x02
  52. #define AUDIO_INTERRUPT_STOP_READ    0x04
  53. #define AUDIO_INTERRUPT_STOP_WRITE    0x08
  54. #define AUDIO_INTERRUPT_UNEXPECTED    0x10
  55.